package com.sz.app.oss.web.security;

import com.sz.biz.app.web.security.AbstractPrincipalManager;
import com.sz.common.base.constants.AppDomain;
import com.sz.common.core.service.Principal;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * Function: TODO: ADD FUNCTION <br>
 * Author: Charles. <br>
 * Date: 2017-05-19 14:03:00.
 */
@Service("webPrincipalManager")
public class WebPrincipalManager extends AbstractPrincipalManager {

    @Override
    protected Principal createPrincipal(int appDomain, int accountId, String accountName, Map<String, Object> props) {
        Principal principal = new WebPrincipal(AppDomain.OPERATION, accountId, accountName);
        return principal;
    }
}
